﻿{extends file="profile/layout.tpl"}
{block name="title"}##NA_PESONAL_INFO##{/block}
{block name="script"}
	$(document).ready(function () {
		setDatePicker('birthday');
		$("#frm1").validate({
            rules: {
                name: {
                    required: true
                },
                gender: {
                    required: true
                },
                birthday: {
                    required: true
                },
				mobile_phone: {
					required: true
				}

            },
            messages: {

                name: {
                    required: '##EM_NAME_IS_REQUIRED##'
                },
                gender: {
                    required: '##EM_GENDER_IS_REQUIRED##'
                },
                birthday: {
                    required: '##EM_BIRTHDAY_IS_REQUIRED##'
                },
				mobile_phone: {
					required: '##EM_MOBILEPHONE_IS_REQUIRED##'
				}
            }
			});
	});
{/block}

{block name="name"}
    ##NG_PERSONAL_INFOMATION##
{/block}
{block name="content"}
   

    <div class="message error" style="display:{$is_display_error|default:'none'};">{$error_message|default:''}</div>
    <div class="clear">
        </div>	
    <form id="frm1" name="frm1" action="1.php" method="post">
 
    <table class="data display datatable" cellpadding="10" cellspacing="10" 
        align="left" border="2">
        <tbody>
            <tr>
                <td width="20%"><strong>##NG_NAME##:</strong></td>
                <td>
                    <input id="name" type="text" value="{$name|default:''}" maxlength="45" size="50" name="name"/>
                    (*)
                </td>
            </tr>
            <tr>
                <td><strong>##NG_GENDER##:</strong></td>
                <td>
                    <select id="gender" name="gender">
						{if $gender == null}
						<option value="" selected> ##NG_SELECT## </option>
						{/if}
                        <option value="1" {if $gender == 1}selected{/if}> ##NG_MALE## </option>
                        <option value="2" {if $gender == 2}selected{/if}> ##NG_FEMALE## </option>
                    </select>
                    (*)
                </td>
            </tr>
            <tr>
                <td><strong>##NG_BIRTHDAY##:</strong></td>
                <td>
                    <input type="text" id="birthday" name="birthday" value="{$birthday|date_format:"%d-%m-%Y" }"/>
                    (*)
                </td>
            </tr>
            <tr>
                <td><strong>##NG_SCIENTIFIC_TITLE##:</strong></td>
                <td>
                    <select id="scientific_title" name="scientific_title">
						{if !isset($scientific_title)}
                        <option selected value=""> ##NG_SELECT## </option>
						{/if}
                        {foreach $scientific_titles as $i}
                            <option value="{$i.Ma}" {if $scientific_title == $i.TenChucDanh}selected{/if}}> {$i.TenChucDanh} </option>
                        {/foreach}
                        
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan="2"><strong>##NG_CURRENT_EMPLOYER##:</strong></td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_EMPLOYER##:</strong></td>
                <td>
                    <table>
                    <tr>
                    <td>
                    ##NG_VIETNAMESE##:
                    </td>
                    <td>
                    <input id="mainOrg_vi" type="text" value="{$mainOrg_vi|default:''}" maxlength="100" size="50" name="mainOrg_vi"/>
                    </td>
                    </tr>
                    <tr>
                    <td>
                    ##NG_ENGLISH##:
                    </td>
                    <td>
                    <input id="mainOrg_en" type="text" value="{$mainOrg_en|default:''}" maxlength="100" size="50" name="mainOrg_en"/>
                    </td>
                    </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_OFFICE_DEPT##:</strong></td>
                <td>
                   <input id="office_dept" type="text" value="{$office_dept|default:''}" maxlength="100" size="50" name="office_dept"/>
                </td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_ADDRESS##:</strong></td>
                <td>
                    
                    <input id="address" type="text" value="{$address|default:''}" maxlength="200" size="50" name="address"/>
                </td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_CITY##:</strong></td>
                <td>
                    
                    <select id="city" name="city">
						{if !isset($city)}
                        <option selected="" value=""> ##NG_SELECT## </option>
						{/if}
                        {foreach $cities as $i}
                            <option value="{$i}" {if $i==$city}selected{/if} > {$i} </option>
                        {/foreach}
                        
                    </select>
             
                </td>
            </tr>
            <tr>
                <td><strong>##NG_ID_NUMBER##:</strong></td>
                <td>
                    <input id="id_number" type="text" value="{$id_number|default:''}" maxlength="15" size="50" name="id_number"/>
                </td>
            </tr>
            <tr>
                <td><strong>##NG_STUDENT_NUMBER##:</strong></td>
                <td>
                    <input id="student_number" type="text" value="{$student_number|default:''}" maxlength="15" size="50" name="student_number"/>
                </td>
            </tr>
            <tr>
                <td><strong>##NG_TRAINEE_NUMBER##:</strong></td>
                <td>
                    <input id="trainee_number" type="text" value="{$trainee_number|default:''}" maxlength="15" size="50" name="trainee_number" />
                </td>
            </tr>
            <tr>
                <td colspan="2"><strong>##NG_PHONE##:</strong></td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_OFFICE_PHONE##:</strong></td>
                <td>
                   <input id="office_phone" type="text" value="{$office_phone|default:''}" maxlength="20" size="50" name="office_phone"/>
                </td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_MOBILE_PHONE##:</strong></td>
                <td>
                   <input id="mobile_phone" type="text" value="{$mobile_phone|default:''}" maxlength="20" size="50" name="mobile_phone"/>(*)
                </td>
            </tr>
            <tr>
                <td colspan="2"><strong>##NG_BANK_INFORMATION##:</strong></td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_BANK_ACCOUNT##:</strong></td>
                <td>
                    
                    <input id="bank_account" type="text" value="{$bank_account|default:''}" maxlength="20" size="50" name="bank_account"/>
                </td>
            </tr>
            <tr>
                <td align="right"><strong>##NG_BANK##:</strong></td>
                <td>
                    
                    <input id="bank_name" type="text" value="{$bank_name|default:''}" maxlength="100" size="50" name="bank_name"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div style="float:left; height:auto">
                        <input type="submit" value="##NG_SAVE##" name="save" class="btn btn-blue"/>
                    </div>
                    <div style="float:right; height:auto">
                        <input type="button" value="##NG_NEXT##" name="next" onclick="window.location.href='2.php'" class="btn btn-blue" />
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
    <div class="clear">
        </div>
{/block}